package com.jielin.handling.entity.vo;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jielin.handling.bean.base.BaseSearch;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author chenzhang
 * @date 2019/9/5 - 15:21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GoodsAmountVo  extends BaseSearch {
    private Integer  amount;
    private String caseName;
    private String caseCode;
    private String caseStaus;
    private String caseType;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private String acceptTime;
    private String civilianPolice;
    private String policeCode;
    private String orgIds;
    private String unitCodes;
    private String[] array;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date startDate;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date endDate;
    private String crimeSite;
    private String goodsType;
    private String applyPolice;
    private String findingsOfAudit;
    private String goodsWarehousing;
    private String goodName; //物品名称
    private String itemStatus; //物品类型
    private String policeId; //登录警员id
    @Override
    public void setQueryCondition(JSONObject queryCondition) {
        this.caseName=queryCondition.getString("caseName");
        this.caseCode=queryCondition.getString("caseCode");
        this.orgIds=queryCondition.getString("orgIds");
        this.unitCodes=queryCondition.getString("unitCodes");
        this.policeCode=queryCondition.getString("policeCode");
        this.caseStaus=queryCondition.getString("caseStaus");
        this.caseType=queryCondition.getString("caseType");
        this.goodsType=queryCondition.getString("goodsType");
        this.startDate=queryCondition.getDate("startDate");
        this.endDate=queryCondition.getDate("endDate");
        this.applyPolice=queryCondition.getString("applyPolice");
        this.goodName=queryCondition.getString("goodName");
        this.itemStatus=queryCondition.getString("itemStatus");
        this.findingsOfAudit=queryCondition.getString("findingsOfAudit");
        this.policeId=queryCondition.getString("policeId");

    }
}
